Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-40882: Fix a memory leak in SharedMemory on Windows #20684

Merged
merged 3 commits into from
Nov 25, 2022

Conversation

ZackerySpytz
Copy link
Contributor

@ZackerySpytz ZackerySpytz commented Jun 6, 2020

In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed.

https://bugs.python.org/issue40882

In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed.
@csabella
Copy link
Contributor

@zooba, should this be merged? Thanks!

@tiran tiran removed their request for review April 18, 2021 09:50
@lukegarland
Copy link

@zooba
Hi there, are there any plans to have this merged in with the main branch, and be available in a stable version of Python? Would like to know the timeline if possible.

Thanks,
Luke Garland

@iritkatriel
Copy link
Member

@ZackerySpytz This has merge conflicts now.

@kumaraditya303
Copy link
Contributor

I fixed the merge conflicts.

@zooba zooba merged commit 85c128e into python:main Nov 25, 2022
@zooba zooba added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Nov 25, 2022
@miss-islington
Copy link
Contributor

Thanks @ZackerySpytz for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @ZackerySpytz for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @ZackerySpytz and @zooba, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 85c128e34daec7625b74746e127afa25888ccde1 3.10

@miss-islington
Copy link
Contributor

Sorry @ZackerySpytz and @zooba, I had trouble checking out the 3.11 backport branch.
Please retry by removing and re-adding the "needs backport to 3.11" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker 85c128e34daec7625b74746e127afa25888ccde1 3.11

@zooba zooba added needs backport to 3.11 only security fixes and removed needs backport to 3.11 only security fixes labels Nov 25, 2022
@miss-islington
Copy link
Contributor

Thanks @ZackerySpytz for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @ZackerySpytz and @zooba, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 85c128e34daec7625b74746e127afa25888ccde1 3.11

@zooba
Copy link
Member

zooba commented Nov 25, 2022

Any volunteers to do the backport? I've got too many other things checked out right now to do it

lukegarland added a commit to lukegarland/cpython that referenced this pull request Nov 30, 2022
…nGH-20684)

In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed..
(cherry picked from commit 85c128e)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
@lukegarland
Copy link

Here it is for Python 3.10 #99911

@bedevere-bot
Copy link

GH-99911 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Dec 1, 2022
lukegarland added a commit to lukegarland/cpython that referenced this pull request Dec 1, 2022
…nGH-20684)

In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed..
(cherry picked from commit 85c128e)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
lukegarland added a commit to lukegarland/cpython that referenced this pull request Dec 1, 2022
…nGH-20684)

In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed..
(cherry picked from commit 85c128e)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
lukegarland added a commit to lukegarland/cpython that referenced this pull request Dec 1, 2022
…nGH-20684)

In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed.
(cherry picked from commit 85c128e)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
zooba pushed a commit that referenced this pull request Dec 2, 2022
In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed.
(cherry picked from commit 85c128e)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
lukegarland pushed a commit to lukegarland/cpython that referenced this pull request Dec 3, 2022
In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed.

(cherry picked from commit 85c128e)
@bedevere-bot
Copy link

GH-99973 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Dec 3, 2022
@lukegarland
Copy link

Backport for 3.11 is here: #99973

ambv pushed a commit that referenced this pull request Dec 5, 2022
) (#99973)

bpo-40882: Fix a memory leak in SharedMemory on Windows (GH-20684)

In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed.

(cherry picked from commit 85c128e)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants